package com.cykj.controller;

import com.cykj.service.FoodService;
import com.cykj.util.ResponseDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/food")
public class FoodController {
    @Autowired
    private FoodService foodService;
    @RequestMapping("/getFoods")
    public ResponseDto getFoods(int pageCurr, int pageSize) {
        return foodService.getFoods(pageCurr, pageSize);
    }
    @RequestMapping("/searchInfo")
    public ResponseDto searchInfo(int pageCurr, int pageSize, String value) {
        return foodService.searchInfo(pageCurr, pageSize, value);
    }
}
